package com.xbongbong.paas.model;

import com.xbongbong.paas.domain.entity.PaasProcessRelatedDataEntity;

import java.util.List;
import java.util.Map;

/**
 * @author: lee
 * @date: 2020/07/14 14:39
 * @desrcption: 流程中间数据
 */
public interface PaasProcessRelatedDataModel {

    /**
     * 插入实体
     *
     * @param entity 实体
     *
     * @return Integer MyBatis操作结果 1：成功
     */
    Integer insert(PaasProcessRelatedDataEntity entity);

    /**
     *  查询列表
     * @author lee
     * @date 2020/07/14 14:39
     * @param entity
     * @descption
     */
    List<PaasProcessRelatedDataEntity> list(Map<String, Object> entity);

    /**
     * 查询单个实体
     * @param key
     * @param corpid
     * @return
     */
    PaasProcessRelatedDataEntity getByKey(Integer key, String corpid);
    /**
     *  查询列表数量
     * @author lee
     * @date 2020/07/14 14:39
     * @param entity
     * @descption
     * @return Integer
     */
    Integer getEntitysCount(Map<String, Object> entity);

    /**
     * 删除实体
     * @author lee
     * @date 2020/07/14 14:39
     * @param entity 实体
     * @descption
     * @return java.lang.Integer  mybatis操作结果，1：成功
     */
    Integer delete(PaasProcessRelatedDataEntity entity);

    /**
     *  更新名字
     * @author lee
     * @date 2020/07/14 14:39
     * @param entity
     * @descption
     * @return java.lang.Integer
     */
    Integer update(PaasProcessRelatedDataEntity entity);

    /**
     * 批量插入
     * @param list
     * @return
     */
    void insertBatch(List<PaasProcessRelatedDataEntity> list);

    /**
     * 查询单个实体
     * @param key
     * @param corpid
     * @return
     */
    List<PaasProcessRelatedDataEntity> getByTaskId(Long key, String corpid);

    List<PaasProcessRelatedDataEntity> findEntitys(Map<String, Object> param);

    void deleteByTaskId(Long taskId, String corpid);

    void updateFlowStatusByTaskId(Long taskId, String corpid, Integer flowStatus);

    List<PaasProcessRelatedDataEntity> getByRefIdAndBusinessType(Long refId, Integer businessType, String corpid);
}
